<template>
  <div style="background-color: #ececec; padding: 20px;height: 100%;" >
    <a-card title="使用手册" :bordered="false" style="width: 100%;height: 100%;">
      <h1>接口说明</h1>
      <p>url = "接口文档信息中的url"</p>
      <h1>下载SDK</h1>
      <div>
        <a-button type="primary" @click="downSDK">
          下载
        </a-button>
      </div>
      <h1>引入SDK包</h1>
      <div>
        <a-collapse v-model:activeKey="activeKey">
          <a-collapse-panel key="3" header="示例">
            <p>&ltdependency&gt</p>
            <p>&ltgroupId&gtcom.wxb&lt/groupId&gt</p>
            <p>&ltartifactId&gtapi-client-SDK&lt/artifactId&gt</p>
            <p>&ltversion&gt0.0.3&lt/version&gt</p>
            <p>&ltscope&gtsystem&lt/scope&gt</p>
            <p>&lt!---${project.basedir}代表根目录---!&gt</p>
            <p>&ltsystemPath&gt${project.basedir}/jar包地址&lt/systemPath&gt</p>
            <p>&lt/dependency&gt</p>
          </a-collapse-panel>

        </a-collapse>
      </div>
      <h1>创建客户端client</h1>
      <div>
        <a-collapse v-model:activeKey="activeKey">
          <a-collapse-panel key="1" header="示例">
            <p>String secretKey = "********"</p>
            <p>String accessKey = "********"</p>
            <p>Client client = new client(accessKey,secretKey)</p>
          </a-collapse-panel>

        </a-collapse>
      </div>
      <h1>调用接口</h1>
      <div>
        <a-collapse v-model:activeKey="activeKey">
          <a-collapse-panel key="2" header="示例">
            <p>client.commonInvokeAPI(url, "传入参数");</p>
          </a-collapse-panel>

        </a-collapse>
      </div>
    </a-card>
  </div>
</template>
<script setup lang="ts">
const downSDK = ()=>{
  let link = document.createElement('a');
  link.style.display = 'none';
  var baseUrl = process.env.BASE_URL;
  link.href = baseUrl +'api-client-SDK-0.0.3.jar';
  document.body.appendChild(link);
  link.click();
}

</script>